#!/usr/bin/env python

PACKAGE = "whu_controller"

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()


v9=gen.add_group("v9", type="tab")

v9.add("Vcmd",double_t, 0, "m/s", 1.0, 0.0, 10.0)
v9.add("turnVcmd",double_t, 0, "m/s", 1.0, 0.0, 10.0)
v9.add("baseAngle",double_t, 0, "the middle pos of servo", 90, 0, 180)
v9.add("AngleGain",double_t, 0, "Angle Gain", -1.2, -5, 5)
v9.add("SPEED_CONTROL_P",double_t, 0, "basereverse",0.0, 0.0,1000000.0)
v9.add("SPEED_CONTROL_I",double_t, 0, "basereverse",0.0, 0.0,1000000.0)
v9.add("SPEED_CONTROL_D",double_t, 0, "basereverse",0.0, 0.0,1000000.0)
v9.add("SPEED_CONTROL_P_BK",double_t, 0, "basereverse",0.0, 0.0,1000000.0)



whuLfw = gen.add_group("whuLfw", type="tab")
whuLfw.add("strOrCurve",double_t, 0, "boundaries of straight and curve line(rad)",0.14, 0.0,4.0)
whuLfw.add("angleCeil",double_t, 0, "angle ceiling(rad)",0.35, 0.0,4.0)
whuLfw.add("curLfw",double_t, 0, "curve line",0.6, 0.0,4.0)
whuLfw.add("strLfw",double_t, 0, "stright line",1.5, 0.0,4.0)

changgui=gen.add_group("changgui", type="tab")
changgui.add("baseSpeed",int_t, 0, "expected volecity(open loop),unit:ms", 1600, 1300, 1800)
changgui.add("deadSpeed",int_t, 0, "dead zone volecity(open loop),unit:ms", 1560, 1300, 1800)
changgui.add("turnSpeed",int_t, 0, "turning volecity(open loop),unit:ms", 1572, 1300, 1800)
changgui.add("backSpeed",int_t, 0, "back volecity(open loop),unit:ms", 1290, 1290, 1800)
changgui.add("AngleGainBack",double_t, 0, "Angle Gain", -1.2, -5, 5)
changgui.add("Lfw",double_t, 0, "lookfoward",0.7, 0.0,10.0)
changgui.add("Lrv",double_t, 0, "lookreverse",0.8, 0.0,10.0)
changgui.add("lrv",double_t, 0, "basereverse",0.13, 0.0,10.0)


exit(gen.generate(PACKAGE, "whu_controller","art_car_controller"))